
Write-Host -ForegroundColor Yellow "Email: Setting Outgoing E-mail Settings for $env:farmname."

$loadasm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$SPGlobalAdmin =  New-Object Microsoft.SharePoint.Administration.SPGlobalAdmin

$SPGlobalAdmin.UpdateMailSettings( "emailserver", "outgoing@contoso.com", "outgoing@contoso.com", 65001)


Write-Host -ForegroundColor Yellow "Email: Setting Outgoing E-mail Settings for $env:farmname. : COMPLETED"

